<template>
    <div class="flex cur" @click="e_change">
        <div class="show fcc">
            <span v-if="selected">√</span>
        </div>
        <span v-text="label"></span>
    </div>
</template>

<script>
export default {
	name: 'flex',
	props: {
		label: {
			default: '多选标签',
		},
		name: {
			default: '0',
		},
	},
	data() {
		return {
			selected: false,
		}
	},
	created() {},
	methods: {
		e_change() {
			let a = this.selected
			this.selected = !a
			this.$emit('select', this.selected, this.name)
		},
	},
}
</script>

<style scoped>
.flex {
	font-size: 14px;
	user-select: none;
}
.show {
	margin-right: 10px;
	border-radius: 4px;
	width: 18px;
	height: 18px;
	border: 1px solid gray;
}
</style>